backlog: P2 Schema-as-Graph first-class entities (Aaron Otto-127)#320
backlog: P2 Schema-as-Graph first-class entities (Aaron Otto-127)#320
Conversation
Aaron Otto-127 directive: 'would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog'. Natural extension of Graph substrate (PR #317/#319). Schema-as- Graph is NOT a visualization — it's canonical representation with typed node/edge/entity kinds for higher fidelity than SQL: - Nodes: Table / Column / Index / Constraint / View / etc. - Edges: ForeignKey / Contains / DependsOn / InheritsFrom / etc. - Custom entities: Domain / Aggregate / EventStream / Retraction (first-class 'relationship was removed' edges with timestamp) / Provenance (migration / who / when for each edge) Round-trip tests ensure SQL ↔ Graph preserves invariants. Bidirectional mutations: Graph changes emit SQL DDL; DDL changes mutate Graph. Schema-change-over-time becomes Graph event stream with retraction- native semantics. P2; effort M+M+L. Aminata threat-pass: BP-11 (schema-as-data-not- directives; tool-generated DDL requires review). Composes with Graph substrate (PR #317/#319) + Otto-121 tight-in- all-aspects directive. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Adds a new P2 research-grade backlog item to track “Schema-as-Graph” as a first-class, canonical schema representation built on the Graph substrate (PR #317/#319), including retraction-native schema evolution and potential SQL round-tripping.
Changes:
- Add a P2 backlog entry describing Schema-as-Graph scope, invariants, and desired bidirectional SQL/DDL integration.
|
|
||
| ## P2 — research-grade | ||
|
|
||
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + custom entities) as a first-class graph view, with typed edge/node/entity kinds for higher fidelity than SQL allows.** Aaron 2026-04-24 Otto-127 directive: *"would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog"*. Natural extension of the Graph substrate landed Otto-124/126 (PR #317 + PR #319). Scope: (1) define schema-node types — Table / Column / Index / Constraint / View / StoredProcedure / Trigger (or broader if non-SQL); (2) define schema-edge types — ForeignKey / Contains / References / DependsOn / InheritsFrom / ImplementsInterface (higher-fidelity than SQL's binary FK-or-not); (3) define custom entity types beyond SQL — e.g. Domain (conceptual grouping), Aggregate (DDD-style consistency boundary), EventStream (for event-sourced entities), Retraction (first-class "this relationship was removed" edge with timestamp), Provenance (which migration / who / when for each edge); (4) round-trip tests: SQL schema → Graph → SQL schema preserves invariants; (5) bidirectional: mutations in Graph can emit SQL DDL; SQL DDL can mutate Graph. This is NOT just a visualization; it's the canonical representation. Database schema becomes a `Graph<SchemaEntity>` with all retraction-native + event-stream + operator-algebra properties Otto-121 codified. Schema-change-over-time = Graph-event-stream. Aminata threat-pass: schema-as-data-not-directives; tool-generated DDL requires review (BP-11). Priority P2 research-grade; effort M (type design + operators) + M (round-trip tests) + L (DDL emitter if shipped). Composes with Graph substrate (PR #317/#319) + ZSet's retraction-native semantics + Otto-121 tight-in-all-aspects directive. |
There was a problem hiding this comment.
P1 (xref): This references “Otto-124/126” as the source for PR #317/#319, but there’s no other in-repo occurrence of Otto-124 or Otto-126 to resolve what those identifiers mean. Consider either (a) replacing Otto-124/126 with a resolvable reference (e.g., the Graph substrate ADR in docs/DECISIONS/...) or (b) dropping the Otto-124/126 mention and just citing PR #317/#319.
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + custom entities) as a first-class graph view, with typed edge/node/entity kinds for higher fidelity than SQL allows.** Aaron 2026-04-24 Otto-127 directive: *"would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog"*. Natural extension of the Graph substrate landed Otto-124/126 (PR #317 + PR #319). Scope: (1) define schema-node types — Table / Column / Index / Constraint / View / StoredProcedure / Trigger (or broader if non-SQL); (2) define schema-edge types — ForeignKey / Contains / References / DependsOn / InheritsFrom / ImplementsInterface (higher-fidelity than SQL's binary FK-or-not); (3) define custom entity types beyond SQL — e.g. Domain (conceptual grouping), Aggregate (DDD-style consistency boundary), EventStream (for event-sourced entities), Retraction (first-class "this relationship was removed" edge with timestamp), Provenance (which migration / who / when for each edge); (4) round-trip tests: SQL schema → Graph → SQL schema preserves invariants; (5) bidirectional: mutations in Graph can emit SQL DDL; SQL DDL can mutate Graph. This is NOT just a visualization; it's the canonical representation. Database schema becomes a `Graph<SchemaEntity>` with all retraction-native + event-stream + operator-algebra properties Otto-121 codified. Schema-change-over-time = Graph-event-stream. Aminata threat-pass: schema-as-data-not-directives; tool-generated DDL requires review (BP-11). Priority P2 research-grade; effort M (type design + operators) + M (round-trip tests) + L (DDL emitter if shipped). Composes with Graph substrate (PR #317/#319) + ZSet's retraction-native semantics + Otto-121 tight-in-all-aspects directive. | |
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + custom entities) as a first-class graph view, with typed edge/node/entity kinds for higher fidelity than SQL allows.** Aaron 2026-04-24 Otto-127 directive: *"would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog"*. Natural extension of the Graph substrate landed in PR #317 and PR #319. Scope: (1) define schema-node types — Table / Column / Index / Constraint / View / StoredProcedure / Trigger (or broader if non-SQL); (2) define schema-edge types — ForeignKey / Contains / References / DependsOn / InheritsFrom / ImplementsInterface (higher-fidelity than SQL's binary FK-or-not); (3) define custom entity types beyond SQL — e.g. Domain (conceptual grouping), Aggregate (DDD-style consistency boundary), EventStream (for event-sourced entities), Retraction (first-class "this relationship was removed" edge with timestamp), Provenance (which migration / who / when for each edge); (4) round-trip tests: SQL schema → Graph → SQL schema preserves invariants; (5) bidirectional: mutations in Graph can emit SQL DDL; SQL DDL can mutate Graph. This is NOT just a visualization; it's the canonical representation. Database schema becomes a `Graph<SchemaEntity>` with all retraction-native + event-stream + operator-algebra properties Otto-121 codified. Schema-change-over-time = Graph-event-stream. Aminata threat-pass: schema-as-data-not-directives; tool-generated DDL requires review (BP-11). Priority P2 research-grade; effort M (type design + operators) + M (round-trip tests) + L (DDL emitter if shipped). Composes with Graph substrate (PR #317/#319) + ZSet's retraction-native semantics + Otto-121 tight-in-all-aspects directive. |
|
|
||
| ## P2 — research-grade | ||
|
|
||
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + custom entities) as a first-class graph view, with typed edge/node/entity kinds for higher fidelity than SQL allows.** Aaron 2026-04-24 Otto-127 directive: *"would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog"*. Natural extension of the Graph substrate landed Otto-124/126 (PR #317 + PR #319). Scope: (1) define schema-node types — Table / Column / Index / Constraint / View / StoredProcedure / Trigger (or broader if non-SQL); (2) define schema-edge types — ForeignKey / Contains / References / DependsOn / InheritsFrom / ImplementsInterface (higher-fidelity than SQL's binary FK-or-not); (3) define custom entity types beyond SQL — e.g. Domain (conceptual grouping), Aggregate (DDD-style consistency boundary), EventStream (for event-sourced entities), Retraction (first-class "this relationship was removed" edge with timestamp), Provenance (which migration / who / when for each edge); (4) round-trip tests: SQL schema → Graph → SQL schema preserves invariants; (5) bidirectional: mutations in Graph can emit SQL DDL; SQL DDL can mutate Graph. This is NOT just a visualization; it's the canonical representation. Database schema becomes a `Graph<SchemaEntity>` with all retraction-native + event-stream + operator-algebra properties Otto-121 codified. Schema-change-over-time = Graph-event-stream. Aminata threat-pass: schema-as-data-not-directives; tool-generated DDL requires review (BP-11). Priority P2 research-grade; effort M (type design + operators) + M (round-trip tests) + L (DDL emitter if shipped). Composes with Graph substrate (PR #317/#319) + ZSet's retraction-native semantics + Otto-121 tight-in-all-aspects directive. |
There was a problem hiding this comment.
P1 (xref): This entry introduces “Otto-127 directive” but there’s no corresponding in-repo reference to Otto-127 (e.g., a memory or ADR) that readers can follow for context. If Otto-127 is meant to be a durable directive handle, consider adding the backing record (or linking to an existing one) so the identifier is traceable.
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + custom entities) as a first-class graph view, with typed edge/node/entity kinds for higher fidelity than SQL allows.** Aaron 2026-04-24 Otto-127 directive: *"would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog"*. Natural extension of the Graph substrate landed Otto-124/126 (PR #317 + PR #319). Scope: (1) define schema-node types — Table / Column / Index / Constraint / View / StoredProcedure / Trigger (or broader if non-SQL); (2) define schema-edge types — ForeignKey / Contains / References / DependsOn / InheritsFrom / ImplementsInterface (higher-fidelity than SQL's binary FK-or-not); (3) define custom entity types beyond SQL — e.g. Domain (conceptual grouping), Aggregate (DDD-style consistency boundary), EventStream (for event-sourced entities), Retraction (first-class "this relationship was removed" edge with timestamp), Provenance (which migration / who / when for each edge); (4) round-trip tests: SQL schema → Graph → SQL schema preserves invariants; (5) bidirectional: mutations in Graph can emit SQL DDL; SQL DDL can mutate Graph. This is NOT just a visualization; it's the canonical representation. Database schema becomes a `Graph<SchemaEntity>` with all retraction-native + event-stream + operator-algebra properties Otto-121 codified. Schema-change-over-time = Graph-event-stream. Aminata threat-pass: schema-as-data-not-directives; tool-generated DDL requires review (BP-11). Priority P2 research-grade; effort M (type design + operators) + M (round-trip tests) + L (DDL emitter if shipped). Composes with Graph substrate (PR #317/#319) + ZSet's retraction-native semantics + Otto-121 tight-in-all-aspects directive. | |
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + custom entities) as a first-class graph view, with typed edge/node/entity kinds for higher fidelity than SQL allows.** Backlog note from 2026-04-24: *"would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog"*. Natural extension of the Graph substrate landed Otto-124/126 (PR #317 + PR #319). Scope: (1) define schema-node types — Table / Column / Index / Constraint / View / StoredProcedure / Trigger (or broader if non-SQL); (2) define schema-edge types — ForeignKey / Contains / References / DependsOn / InheritsFrom / ImplementsInterface (higher-fidelity than SQL's binary FK-or-not); (3) define custom entity types beyond SQL — e.g. Domain (conceptual grouping), Aggregate (DDD-style consistency boundary), EventStream (for event-sourced entities), Retraction (first-class "this relationship was removed" edge with timestamp), Provenance (which migration / who / when for each edge); (4) round-trip tests: SQL schema → Graph → SQL schema preserves invariants; (5) bidirectional: mutations in Graph can emit SQL DDL; SQL DDL can mutate Graph. This is NOT just a visualization; it's the canonical representation. Database schema becomes a `Graph<SchemaEntity>` with all retraction-native + event-stream + operator-algebra properties Otto-121 codified. Schema-change-over-time = Graph-event-stream. Aminata threat-pass: schema-as-data-not-directives; tool-generated DDL requires review (BP-11). Priority P2 research-grade; effort M (type design + operators) + M (round-trip tests) + L (DDL emitter if shipped). Composes with Graph substrate (PR #317/#319) + ZSet's retraction-native semantics + Otto-121 tight-in-all-aspects directive. |
|
|
||
| ## P2 — research-grade | ||
|
|
||
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + custom entities) as a first-class graph view, with typed edge/node/entity kinds for higher fidelity than SQL allows.** Aaron 2026-04-24 Otto-127 directive: *"would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog"*. Natural extension of the Graph substrate landed Otto-124/126 (PR #317 + PR #319). Scope: (1) define schema-node types — Table / Column / Index / Constraint / View / StoredProcedure / Trigger (or broader if non-SQL); (2) define schema-edge types — ForeignKey / Contains / References / DependsOn / InheritsFrom / ImplementsInterface (higher-fidelity than SQL's binary FK-or-not); (3) define custom entity types beyond SQL — e.g. Domain (conceptual grouping), Aggregate (DDD-style consistency boundary), EventStream (for event-sourced entities), Retraction (first-class "this relationship was removed" edge with timestamp), Provenance (which migration / who / when for each edge); (4) round-trip tests: SQL schema → Graph → SQL schema preserves invariants; (5) bidirectional: mutations in Graph can emit SQL DDL; SQL DDL can mutate Graph. This is NOT just a visualization; it's the canonical representation. Database schema becomes a `Graph<SchemaEntity>` with all retraction-native + event-stream + operator-algebra properties Otto-121 codified. Schema-change-over-time = Graph-event-stream. Aminata threat-pass: schema-as-data-not-directives; tool-generated DDL requires review (BP-11). Priority P2 research-grade; effort M (type design + operators) + M (round-trip tests) + L (DDL emitter if shipped). Composes with Graph substrate (PR #317/#319) + ZSet's retraction-native semantics + Otto-121 tight-in-all-aspects directive. |
There was a problem hiding this comment.
P2 (readability): This backlog row is a single very long line with multiple nested “Scope: (1)…(5)” items, which makes future diffs and review harder. Consider splitting the scope into wrapped lines or nested sub-bullets under the main checkbox (keeping markdown continuation indentation consistent with nearby entries).
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + custom entities) as a first-class graph view, with typed edge/node/entity kinds for higher fidelity than SQL allows.** Aaron 2026-04-24 Otto-127 directive: *"would it be possible to have a graph view of the entire table and relations so the whole schema is first class i the graph plus we could have special edge node whatever else we need entities if needed for more fidelity than reguarl sql table structrue and relationships allow. backlog"*. Natural extension of the Graph substrate landed Otto-124/126 (PR #317 + PR #319). Scope: (1) define schema-node types — Table / Column / Index / Constraint / View / StoredProcedure / Trigger (or broader if non-SQL); (2) define schema-edge types — ForeignKey / Contains / References / DependsOn / InheritsFrom / ImplementsInterface (higher-fidelity than SQL's binary FK-or-not); (3) define custom entity types beyond SQL — e.g. Domain (conceptual grouping), Aggregate (DDD-style consistency boundary), EventStream (for event-sourced entities), Retraction (first-class "this relationship was removed" edge with timestamp), Provenance (which migration / who / when for each edge); (4) round-trip tests: SQL schema → Graph → SQL schema preserves invariants; (5) bidirectional: mutations in Graph can emit SQL DDL; SQL DDL can mutate Graph. This is NOT just a visualization; it's the canonical representation. Database schema becomes a `Graph<SchemaEntity>` with all retraction-native + event-stream + operator-algebra properties Otto-121 codified. Schema-change-over-time = Graph-event-stream. Aminata threat-pass: schema-as-data-not-directives; tool-generated DDL requires review (BP-11). Priority P2 research-grade; effort M (type design + operators) + M (round-trip tests) + L (DDL emitter if shipped). Composes with Graph substrate (PR #317/#319) + ZSet's retraction-native semantics + Otto-121 tight-in-all-aspects directive. | |
| - [ ] **Schema-as-Graph — entire database schema (tables + relations + | |
| custom entities) as a first-class graph view, with typed | |
| edge/node/entity kinds for higher fidelity than SQL allows.** | |
| Aaron 2026-04-24 Otto-127 directive: *"would it be possible to | |
| have a graph view of the entire table and relations so the whole | |
| schema is first class i the graph plus we could have special | |
| edge node whatever else we need entities if needed for more | |
| fidelity than reguarl sql table structrue and relationships | |
| allow. backlog"*. Natural extension of the Graph substrate | |
| landed Otto-124/126 (PR #317 + PR #319). | |
| Scope: | |
| - define schema-node types — Table / Column / Index / Constraint | |
| / View / StoredProcedure / Trigger (or broader if non-SQL) | |
| - define schema-edge types — ForeignKey / Contains / References | |
| / DependsOn / InheritsFrom / ImplementsInterface | |
| (higher-fidelity than SQL's binary FK-or-not) | |
| - define custom entity types beyond SQL — e.g. Domain | |
| (conceptual grouping), Aggregate (DDD-style consistency | |
| boundary), EventStream (for event-sourced entities), | |
| Retraction (first-class "this relationship was removed" edge | |
| with timestamp), Provenance (which migration / who / when for | |
| each edge) | |
| - round-trip tests: SQL schema → Graph → SQL schema preserves | |
| invariants | |
| - bidirectional: mutations in Graph can emit SQL DDL; SQL DDL | |
| can mutate Graph | |
| This is NOT just a visualization; it's the canonical | |
| representation. Database schema becomes a `Graph<SchemaEntity>` | |
| with all retraction-native + event-stream + operator-algebra | |
| properties Otto-121 codified. Schema-change-over-time = | |
| Graph-event-stream. Aminata threat-pass: | |
| schema-as-data-not-directives; tool-generated DDL requires | |
| review (BP-11). Priority P2 research-grade; effort M (type | |
| design + operators) + M (round-trip tests) + L (DDL emitter if | |
| shipped). Composes with Graph substrate (PR #317/#319) + ZSet's | |
| retraction-native semantics + Otto-121 tight-in-all-aspects | |
| directive. |
|
Superseded by consolidated resurrect. Same pattern. |
Pull request was closed
…+ #320) PRs #313 (pre-landing sanitizer), #314 (claude --agent flag research), and #320 (schema-as-graph) all hit DIRTY state from positional rebase conflicts — each added a row at top of P2, but successive merges of adjacent BACKLOG PRs kept moving the P2 top anchor. Each branch's append collided with main's now-different top. Closed all three and re-filed in a single consolidated PR above the KSK-naming row. Order chosen by directive date: 1. Schema-as-Graph (Otto-127, most recent) 2. Research claude --agent flag (Otto-120) 3. Pre-landing sanitizer (Otto-119) Superseded PRs: - #313 backlog/pre-landing-sanitizer-for-ferry-lint - #314 backlog/claude-cli-agent-flag-research-map - #320 backlog/graph-as-schema-first-class-entities Content preserved + condensed in this PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…320) (#325) * backlog: resurrect 3 BACKLOG rows consolidated (supersedes #313 + #314 + #320) PRs #313 (pre-landing sanitizer), #314 (claude --agent flag research), and #320 (schema-as-graph) all hit DIRTY state from positional rebase conflicts — each added a row at top of P2, but successive merges of adjacent BACKLOG PRs kept moving the P2 top anchor. Each branch's append collided with main's now-different top. Closed all three and re-filed in a single consolidated PR above the KSK-naming row. Order chosen by directive date: 1. Schema-as-Graph (Otto-127, most recent) 2. Research claude --agent flag (Otto-120) 3. Pre-landing sanitizer (Otto-119) Superseded PRs: - #313 backlog/pre-landing-sanitizer-for-ferry-lint - #314 backlog/claude-cli-agent-flag-research-map - #320 backlog/graph-as-schema-first-class-entities Content preserved + condensed in this PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(#325): 2 review threads — priority/section alignment + <agent_name> inline-code escape --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
|
Reopening per 2026-04-24 closed-PR audit (maintainer directive to recover over-closes). This PR captured an Aaron directive into Status note: this PR adds rows to
Retractability-in-action per Otto-238: visible reopen; no silent reversal. |
|
Superseded: Schema-as-Graph BACKLOG row already on main (see existing |
Aaron Otto-127 directive. Natural extension of Graph substrate PR #317/#319 — canonical schema representation as typed Graph, not visualization. Retraction-native schema-change-over-time via event stream.